Skip to content

Fix a couple of UB issues.#95

Merged
twarit-waikar merged 3 commits intosalesforce:masterfrom
sstepashka:master
Feb 18, 2026
Merged

Fix a couple of UB issues.#95
twarit-waikar merged 3 commits intosalesforce:masterfrom
sstepashka:master

Conversation

@sstepashka
Copy link
Contributor

@sstepashka sstepashka commented Feb 9, 2026

This PR fixes the issues described in #92:

  • The fix in main.cc is detected by ASAN, when compile p4-fusion with -fsanitiezer=address, it would trigger the issue immediately.
  • Address the problem described in the bug. It is caused by undefined behavior because of raw pointer copy of ClientUser. Seems like p4api is not designed to be copyable ever.

An alternative solution would be not to inherit from ClientUser for the data models and add a layer where we convert things, but it might require more work to separate it.

@salesforce-cla
Copy link

salesforce-cla bot commented Feb 9, 2026

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Dmitrii Kuragin <d***@A***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, sign the Salesforce Inc. Contributor License Agreement and this Pull Request will be revalidated.

@salesforce-cla
Copy link

salesforce-cla bot commented Feb 9, 2026

Thanks for the contribution! Before we can merge this, we need @sstepashka to sign the Salesforce Inc. Contributor License Agreement.

When the given repo has list of files nore than the cache limit, it's being
evicted from RAM and adding new file into the index requires recalculation for
every add command.
@sstepashka
Copy link
Contributor Author

You already signed the CLA on 2026-02-09

I can't sign it harder :)

@twarit-waikar
Copy link
Contributor

This is amazing, thanks for sending this in!

I will try to find what's up with the CI but I tested this locally and things seem to work.

Thanks again!

@twarit-waikar twarit-waikar merged commit 6040bd7 into salesforce:master Feb 18, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants